Skip to content

chore: Just nargo compile.#3775

Merged
charlielye merged 26 commits into
masterfrom
cl/just_nargo_compile
Jan 3, 2024
Merged

chore: Just nargo compile.#3775
charlielye merged 26 commits into
masterfrom
cl/just_nargo_compile

Conversation

@charlielye

@charlielye charlielye commented Jan 1, 2024

Copy link
Copy Markdown
Contributor

Ok. Don't be scared. 262 files sounds horrific but it's mostly path updates and that kind of nonsense. The noir-contracts and noir-compiler changes are probably what to focus on.

  • We update boxes to use our build of nargo, and the modified code-generator.
  • We update paths in docs, as noir-contracts/src/contracts moved to noir-contracts/contracts, as src is now pure codegen output.
  • Contracts are now imported e.g. import { ChildContractArtifact } from '@aztec/noir-contracts/Child';. You can still just import from top level index, but it's pretty cruel to ask the runtime to parse all the artifacts just to get one, they are huge.
  • Contract files are now just named as per the name of the contract (i.e. not snake case). Less moving parts is better here. Given it's codegen output it's acceptable to allow the output names to be inconsistent.
  • aztec.js is now responsible for copying the account contracts into itself, as opposed to have some other random module push code into it. But we just need to get rid of this baked account stuff at some point anyway.
  • Got rid of lodash.zip in one place, and then restrained myself to not go further. But think we should remove the "trivial" lodash cases at some point.
  • Tidied up yp/bootstrap a bit, it's basically in line with the dockerfile at this point. Will prob make dockerfile just call bootstrap as part of some other docker cleanup I'll do later.
  • source-map-support in cli.
  • Remove compile command from cli. We are just going to promote use of aztec-nargo.
  • The ts and noir generators now expect nargo output as input, rather than our transformed abi. The ts generator outputs the transformed abi as part of it's generation.
  • Delete all the script stuff from noir-contracts. src folder is now just the codegen output, and the codegen is done with a trivial script to call compile and the ts generator in noir-compiler.
  • Added an unused script called transform_json_abi.sh that uses a tiny bit of jq to perform the transform. Probably to be deleted, especially if we just stop transforming the noir output and use it directly, but it served me as a useful tool at one point.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants